package com.sunny.common.job;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.scheduling.quartz.QuartzJobBean;
import org.springframework.stereotype.Component;

/**
 * Created by tongchengke on 2016/8/11.
 */

@Component
public class Job1 extends QuartzJobBean{

    private int timeout;

    public void setTimeout(int timeout){
        this.timeout=timeout;
    }

    @Override
    protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        System.out.println("Job1："+System.currentTimeMillis());
        System.out.println("timeout:"+timeout);
    }
}
